from django.db import models

# Create your models here.
from apps.user.models import User


class Class(models.Model):
    """
    被记账的用户
    """
    name = models.CharField(verbose_name='被记账用户的姓名', max_length=20)
    user = models.ForeignKey(User, related_name="userss", verbose_name='记账用户', on_delete=models.CASCADE)

    class Meta:
        db_table = 'tb_class'
        verbose_name = '欠款的用户'
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.name
